package com.maserb.monitor.service.schoolStudent;

import com.maserb.monitor.entity.schoolStudent.SchoolStudentParentEntity;
import com.maserb.monitor.repository.schoolStudent.SchoolStudentParentRepository;
import com.maserb.monitor.service.base.JpaSpecificationService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;


public interface SchoolStudentParentService extends JpaSpecificationService<SchoolStudentParentRepository, SchoolStudentParentRepository, SchoolStudentParentEntity, String> {

    Page<SchoolStudentParentEntity> findAll(Pageable pageable, String userName, String realName, String phoneNumber, String idcard);

    List<SchoolStudentParentEntity> findAll(String userName, String realName, String phoneNumber, String idcard);

    SchoolStudentParentEntity findByUserName(String userName);

    void doReset(String id);

    void saveByStudentId(List<SchoolStudentParentEntity> list);

    /**
     * 查询同班的家长
     * @param clazzId
     * @return
     */
    List<SchoolStudentParentEntity> findAll(String clazzId);
    /**
     * 查询同班的家长学生信息
     * @param clazzId
     * @return
     */
    List<Object[]> findObjectByClazzId(String clazzId);
}